//
// Created by Hi on 25-8-29.
//

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QPushButton>
#include <QTableView>
#include <QWidget>
#include <QSqlTableModel>
#include <QProgressBar>

#include "sql/QSqlQueryUtil.h"


QT_BEGIN_NAMESPACE
namespace Ui { class mainWindow; }
QT_END_NAMESPACE

class MainWindow : public QWidget {
Q_OBJECT
public:

    void _init();
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow() override;

protected:
    bool eventFilter(QObject *watched, QEvent *event) override;
    bool event(QEvent *event) override;
    void keyPressEvent(QKeyEvent *event) override;


private:
    Ui::mainWindow *ui;
    QPushButton *btn;
    QTableView *tableView;
    QSqlQueryModel *model;
    QProgressBar *progressBar;
    QSqlQueryUtil *sqlQueryUtil;
};


#endif //MAINWINDOW_H
